import { Component, Inject, OnInit } from '@angular/core';

@Component({
  selector: 'app-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.css'],
})
export class LoginComponent implements OnInit {

  username = "";
  password = "";

  constructor(@Inject('auth') private authService) { }

  ngOnInit() {
  }

  on_submit(formVal) {
    console.log(formVal);
    console.log(this.authService.loginWithCredentials(formVal.login.username, formVal.login.password))
  }

}
